import  java.util.Scanner;
public class TestDemo {
    public static int Add(int n) {
        if(n ==1) {
            return 1;
        }
        return n*Add(n-1);
    }
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        System.out.println(Add(a));
    }
  /*
   public static int Sum(int n) {
        if(n == 1) {
            return 1;
        }
        return n+Sum(n-1);
    }
    public static void main5(String[] args) {
        System.out.println(Sum(10));
    }
    public static void ADD(int n) {
        if(n > 9) {
            ADD(n / 10);
        }
        System.out.print(n % 10 + " ");
    }
    public static void main4(String[] args) {
        ADD(1234);
    }
    public static int add(int n) {
        if(n == 1) {
            return 1;
        }
        return n + add(n-1);
    }
    public static void main3(String[] args) {
        System.out.println(add(100));
    }
    public static int fun(int n) {
        if(n <= 2){
            return  1;
        }
        return fun(n-1)+fun(n-2);
    }
    public static  void main2(String[] args) {
        System.out.println(fun(10));
    }
    public static int Add(int a ,int b) {
        return a>b?a:b;
    }
    public static double Add(double a, double b){
        return  a>b?a:b;
    }
    public static  double  Add(int a,int b, double c){
        return (a>b?a:b)>c?(a>b?a:b):c;
    }
    public static void main1(String[] args) {
        System.out.println(Add(5, 10));
        System.out.println(Add(5.0, 10.0));
        System.out.println(Add(18, 10,15.0));
    }*/
}
